package com.flying.invest.strategy.service;

import java.util.Date;

import com.flying.common.annotation.DaoCreate;
import com.flying.common.annotation.DaoQuery;
import com.flying.common.annotation.DaoRemove;
import com.flying.common.annotation.DaoUpdate;
import com.flying.common.util.Codes;
import com.flying.framework.annotation.MethodInfo;
import com.flying.framework.annotation.Param;
import com.flying.framework.annotation.Service;
import com.flying.framework.service.AbstractService;
import com.flying.framework.model.ActionResult;
import com.flying.framework.model.QueryResult;

import com.flying.invest.strategy.model.StrategyInvestMonitorTransaction;

@Service(value="StrategyInvestMonitorTransactionService", desc="投资监控策略交易")
public class StrategyInvestMonitorTransactionService extends AbstractService{
        
	@MethodInfo("新增")
	@DaoCreate(entity=StrategyInvestMonitorTransaction.ENTITY_NAME)
	public StrategyInvestMonitorTransaction create(
			@Param(value=StrategyInvestMonitorTransaction.TRANSACTION_ID, required=true,	desc="交易ID") Long transaction_id,
			@Param(value=StrategyInvestMonitorTransaction.USER_ID, required=true,	desc="所属用户") Long user_id,
			@Param(value=StrategyInvestMonitorTransaction.TYPE_ID, required=true,	desc="策略类型") Long type_id,
			@Param(value=StrategyInvestMonitorTransaction.INVEST_ID, required=true,	desc="投资项目") Long invest_id,
			@Param(value=StrategyInvestMonitorTransaction.STRATEGY_ID, required=true,	desc="策略ID") Long strategy_id,
			
			@Param(value=StrategyInvestMonitorTransaction.TRANSACTION_TYPE, required=false,	desc="交易类型") Integer transaction_type,
			@Param(value=StrategyInvestMonitorTransaction.AMOUNT, required=false,	desc="交易金额") Double amount,
			@Param(value=StrategyInvestMonitorTransaction.QUANTITY, required=false,	desc="交易数量") Double quantity,
			@Param(value=StrategyInvestMonitorTransaction.PRICE, required=false,	desc="交易价格") Double price,
			@Param(value=StrategyInvestMonitorTransaction.CREATE_TIME, required=false,	desc="创建时间") Date create_time
		) {
		return null;
	}

	@MethodInfo("修改")
	@DaoUpdate(entity=StrategyInvestMonitorTransaction.ENTITY_NAME)
	public ActionResult update(
		
			@Param(value=StrategyInvestMonitorTransaction.TRANSACTION_ID, required=true,	desc="交易ID") Long transaction_id,
			@Param(value=StrategyInvestMonitorTransaction.USER_ID, required=true,	desc="所属用户") Long user_id,
			@Param(value=StrategyInvestMonitorTransaction.TYPE_ID, required=true,	desc="策略类型") Long type_id,
			@Param(value=StrategyInvestMonitorTransaction.INVEST_ID, required=true,	desc="投资项目") Long invest_id,
			@Param(value=StrategyInvestMonitorTransaction.STRATEGY_ID, required=true,	desc="策略ID") Long strategy_id,
			@Param(value=StrategyInvestMonitorTransaction.TRANSACTION_TYPE, required=false,	desc="交易类型") Integer transaction_type,
			@Param(value=StrategyInvestMonitorTransaction.AMOUNT, required=false,	desc="交易金额") Double amount,
			@Param(value=StrategyInvestMonitorTransaction.QUANTITY, required=false,	desc="交易数量") Double quantity,
			@Param(value=StrategyInvestMonitorTransaction.PRICE, required=false,	desc="交易价格") Double price,
			@Param(value=StrategyInvestMonitorTransaction.CREATE_TIME, required=false,	desc="创建时间") Date create_time
		) {
		return null;
	}

	@MethodInfo("删除")
	@DaoRemove(entity=StrategyInvestMonitorTransaction.ENTITY_NAME)
	public ActionResult remove(
		
			@Param(value=StrategyInvestMonitorTransaction.TRANSACTION_ID, required=true,	desc="交易ID") Long transaction_id
		) {
		return null;
	}

	@MethodInfo("搜索")
	@DaoQuery(entity=StrategyInvestMonitorTransaction.ENTITY_NAME, pageable=true, modelClass=StrategyInvestMonitorTransaction.class)
	public QueryResult<StrategyInvestMonitorTransaction> findAll(
			@Param(value=Codes.PAGE_NUM, 	required=false, desc="分页页号，默认0") int page,
			@Param(value=Codes.PAGE_SIZE, 	required=false, desc="分页大小，默认10") int rows) {
		return null;
	}

	@MethodInfo("查询")
	@DaoQuery(entity=StrategyInvestMonitorTransaction.ENTITY_NAME, single=true, throwsNotFoundException=true )
	public StrategyInvestMonitorTransaction findById(
		
			@Param(value=StrategyInvestMonitorTransaction.TRANSACTION_ID, required=true,	desc="交易ID") Long transaction_id
		) {
		return null;
	}

}